<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    // this
    // arguments
    var length = 1
    function fn() {
      console.log(this.length, this);
    }
    const obj = {
      length: 100,
      action: function (callback) {
        console.log(this);
        // 输出1
        callback()
        // 输出2
        arguments[0]()
        // 输出3
        var foo = arguments[0]
        foo();
        // 输出4
        this.foo2 = arguments[0]
        this.foo2();
      }
    }
    var arr1 = [1, 2, 3, 4]
    obj.action(fn, ...arr1)
  </script>
</body>

</html>